package com.biz.primus.commodity.enums;

import java.io.Serializable;

public enum GoodsKind implements Serializable {

    NORMAL(0, "普通商品"), SPECIFIC(1, "特有商品"), COUPON(2, "券商品"), GOLD(6, "黄金商品");

    private Integer value;

    private String desc;

    GoodsKind(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static GoodsKind valueOf(Integer value) {
        if (value == null) {
            return null;
        }
        switch (value) {
            case 0:
                return NORMAL;
            case 1:
                return SPECIFIC;
            case 2:
                return COUPON;
            case 6:
                return GOLD;
            default:
                return NORMAL;
        }
    }


}
